3.174 \(\int \frac {(d+e x^2) (a+b \log (c x^n))}{x} \, dx\)

Optimal. Leaf size=52 \[ \frac {d \left (a+b \log \left (c x^n\right )\right )^2}{2 b n}+\frac {1}{2} e x^2 \left (a+b \log \left (c x^n\right )\right )-\frac {1}{4} b e n x^2 \]

[Out]

-1/4*b*e*n*x^2+1/2*e*x^2*(a+b*ln(c*x^n))+1/2*d*(a+b*ln(c*x^n))^2/b/n

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {14, 2351, 2301, 2304} \[ \frac {d \left (a+b \log \left (c x^n\right )\right )^2}{2 b n}+\frac {1}{2} e x^2 \left (a+b \log \left (c x^n\right )\right )-\frac {1}{4} b e n x^2 \]

Antiderivative was successfully verified.

[In]

Int[((d + e*x^2)*(a + b*Log[c*x^n]))/x,x]

[Out]

-(b*e*n*x^2)/4 + (e*x^2*(a + b*Log[c*x^n]))/2 + (d*(a + b*Log[c*x^n])^2)/(2*b*n)

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2301

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2304

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Log[c*x^
n]))/(d*(m + 1)), x] - Simp[(b*n*(d*x)^(m + 1))/(d*(m + 1)^2), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 2351

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> Wit
h[{u = ExpandIntegrand[a + b*Log[c*x^n], (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c,
d, e, f, m, n, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IntegerQ[m] && IntegerQ[r]))

Rubi steps

\begin {align*} \int \frac {\left (d+e x^2\right ) \left (a+b \log \left (c x^n\right )\right )}{x} \, dx &=\int \left (\frac {d \left (a+b \log \left (c x^n\right )\right )}{x}+e x \left (a+b \log \left (c x^n\right )\right )\right ) \, dx\\ &=d \int \frac {a+b \log \left (c x^n\right )}{x} \, dx+e \int x \left (a+b \log \left (c x^n\right )\right ) \, dx\\ &=-\frac {1}{4} b e n x^2+\frac {1}{2} e x^2 \left (a+b \log \left (c x^n\right )\right )+\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{2 b n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 57, normalized size = 1.10 \[ a d \log (x)+\frac {1}{2} a e x^2+\frac {b d \log ^2\left (c x^n\right )}{2 n}+\frac {1}{2} b e x^2 \log \left (c x^n\right )-\frac {1}{4} b e n x^2 \]

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x^2)*(a + b*Log[c*x^n]))/x,x]

[Out]

(a*e*x^2)/2 - (b*e*n*x^2)/4 + a*d*Log[x] + (b*e*x^2*Log[c*x^n])/2 + (b*d*Log[c*x^n]^2)/(2*n)

________________________________________________________________________________________

fricas [A]  time = 0.55, size = 55, normalized size = 1.06 \[ \frac {1}{2} \, b e x^{2} \log \relax (c) + \frac {1}{2} \, b d n \log \relax (x)^{2} - \frac {1}{4} \, {\left (b e n - 2 \, a e\right )} x^{2} + \frac {1}{2} \, {\left (b e n x^{2} + 2 \, b d \log \relax (c) + 2 \, a d\right )} \log \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x^2+d)*(a+b*log(c*x^n))/x,x, algorithm="fricas")

[Out]

1/2*b*e*x^2*log(c) + 1/2*b*d*n*log(x)^2 - 1/4*(b*e*n - 2*a*e)*x^2 + 1/2*(b*e*n*x^2 + 2*b*d*log(c) + 2*a*d)*log
(x)

________________________________________________________________________________________

giac [A]  time = 0.32, size = 60, normalized size = 1.15 \[ \frac {1}{2} \, b n x^{2} e \log \relax (x) - \frac {1}{4} \, b n x^{2} e + \frac {1}{2} \, b x^{2} e \log \relax (c) + \frac {1}{2} \, b d n \log \relax (x)^{2} + \frac {1}{2} \, a x^{2} e + b d \log \relax (c) \log \relax (x) + a d \log \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x^2+d)*(a+b*log(c*x^n))/x,x, algorithm="giac")

[Out]

1/2*b*n*x^2*e*log(x) - 1/4*b*n*x^2*e + 1/2*b*x^2*e*log(c) + 1/2*b*d*n*log(x)^2 + 1/2*a*x^2*e + b*d*log(c)*log(
x) + a*d*log(x)

________________________________________________________________________________________

maple [C]  time = 0.27, size = 257, normalized size = 4.94 \[ -\frac {i \pi b e \,x^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )}{4}+\frac {i \pi b e \,x^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{4}+\frac {i \pi b e \,x^{2} \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{4}-\frac {i \pi b e \,x^{2} \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{4}-\frac {i \pi b d \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) \ln \relax (x )}{2}+\frac {i \pi b d \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \relax (x )}{2}+\frac {i \pi b d \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \relax (x )}{2}-\frac {i \pi b d \mathrm {csgn}\left (i c \,x^{n}\right )^{3} \ln \relax (x )}{2}-\frac {b d n \ln \relax (x )^{2}}{2}-\frac {b e n \,x^{2}}{4}+\frac {b e \,x^{2} \ln \relax (c )}{2}+\frac {a e \,x^{2}}{2}+b d \ln \relax (c ) \ln \relax (x )+a d \ln \relax (x )+\left (\frac {b e \,x^{2}}{2}+b d \ln \relax (x )\right ) \ln \left (x^{n}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x^2+d)*(b*ln(c*x^n)+a)/x,x)

[Out]

(1/2*e*b*x^2+b*d*ln(x))*ln(x^n)-1/2*b*d*n*ln(x)^2+1/4*I*Pi*b*e*x^2*csgn(I*x^n)*csgn(I*c*x^n)^2-1/4*I*Pi*b*e*x^
2*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-1/4*I*Pi*b*e*x^2*csgn(I*c*x^n)^3+1/4*I*Pi*b*e*x^2*csgn(I*c*x^n)^2*csgn(I
*c)+1/2*b*e*x^2*ln(c)-1/4*b*e*n*x^2+1/2*a*e*x^2+1/2*I*ln(x)*Pi*b*d*csgn(I*x^n)*csgn(I*c*x^n)^2-1/2*I*ln(x)*Pi*
b*d*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-1/2*I*ln(x)*Pi*b*d*csgn(I*c*x^n)^3+1/2*I*ln(x)*Pi*b*d*csgn(I*c*x^n)^2*
csgn(I*c)+ln(x)*ln(c)*b*d+ln(x)*a*d

________________________________________________________________________________________

maxima [A]  time = 0.61, size = 49, normalized size = 0.94 \[ -\frac {1}{4} \, b e n x^{2} + \frac {1}{2} \, b e x^{2} \log \left (c x^{n}\right ) + \frac {1}{2} \, a e x^{2} + \frac {b d \log \left (c x^{n}\right )^{2}}{2 \, n} + a d \log \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x^2+d)*(a+b*log(c*x^n))/x,x, algorithm="maxima")

[Out]

-1/4*b*e*n*x^2 + 1/2*b*e*x^2*log(c*x^n) + 1/2*a*e*x^2 + 1/2*b*d*log(c*x^n)^2/n + a*d*log(x)

________________________________________________________________________________________

mupad [B]  time = 3.34, size = 48, normalized size = 0.92 \[ a\,d\,\ln \relax (x)+\frac {e\,x^2\,\left (2\,a-b\,n\right )}{4}+\frac {b\,e\,x^2\,\ln \left (c\,x^n\right )}{2}+\frac {b\,d\,{\ln \left (c\,x^n\right )}^2}{2\,n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((d + e*x^2)*(a + b*log(c*x^n)))/x,x)

[Out]

a*d*log(x) + (e*x^2*(2*a - b*n))/4 + (b*e*x^2*log(c*x^n))/2 + (b*d*log(c*x^n)^2)/(2*n)

________________________________________________________________________________________

sympy [A]  time = 0.91, size = 71, normalized size = 1.37 \[ a d \log {\relax (x )} + \frac {a e x^{2}}{2} + \frac {b d n \log {\relax (x )}^{2}}{2} + b d \log {\relax (c )} \log {\relax (x )} + \frac {b e n x^{2} \log {\relax (x )}}{2} - \frac {b e n x^{2}}{4} + \frac {b e x^{2} \log {\relax (c )}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x**2+d)*(a+b*ln(c*x**n))/x,x)

[Out]

a*d*log(x) + a*e*x**2/2 + b*d*n*log(x)**2/2 + b*d*log(c)*log(x) + b*e*n*x**2*log(x)/2 - b*e*n*x**2/4 + b*e*x**
2*log(c)/2

________________________________________________________________________________________